<template>
  <div class="box">
    <div class="box-1">
      <el-form-item label="用户名:">
        <el-col :span="24">
          <el-input type="text" v-model="userObj.userName"  placeholder="请输入用户"/>
        </el-col>
      </el-form-item>
      <el-form-item label="密码:">
        <el-col :span="24">
          <el-input  type="password" v-model="userObj.pwd"  placeholder="请输入密码"/>
        </el-col>
      </el-form-item>
      <el-button type="primary" @click="land">登录</el-button>
    </div>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      userObj:{}
    }
  },
  methods:{
    land(){
      axios.get("/project/user/login",{params:this.userObj}).then(resp=>{
        if (resp.data!=null){
          this.$router.push("/index")
        }
      })
    }
  }
}
</script>

<style scoped>
  .box{
    height: 100vh;
   background-color:azure;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .box-1{
    width: 350px;
    height: 350px;
    border-top: 1px solid rgba(255,255,255,0.5);
    border-left: 1px solid rgba(255,255,255,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    border-right: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    background: rgba(50,50,50,0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
  }
  el-input{
    width: 100px;
  }

</style>